const initalState = {
  // 频道数据
  channels: [],
  page: 1,
  pageSize: 10,
  // 文章列表
  results: [],
  count:0,
}
// page: 1, per_page: 10, results: Array(10), total_count: 4989
export const article = (state = initalState, action) => {
  switch (action.type) {
    // 获取频道列表
    case 'article/getChannels':
      return {
        ...state,
          channels: action.payload.channels,
        
      }
    case 'articlt/getArticle':
      return {
        ...state,
        ...action.payload,
      }
    default:
      return state
  }
}
